import time
import unittest
from parameterized import parameterized

from api import Ihrm_Api
from api.Ihrm_Api import Ihrm_Test_Api
from config import abs_path
from tools.ihtm_tools import assrt, get_data

list=get_data(abs_path + "/data/add.json")
print(list)


class Test_Add_dapartment(unittest.TestCase):
    @parameterized.expand(list)
    def test_add(self,data,success,code,message,title):
        result=Ihrm_Test_Api.add_department(data)
        print(result.json())

        assrt(self,result,success,code,message)



